//
//  YDBaseHeaderView.m
//  IngCard
//
//  Created by kf on 2017/6/6.
//  Copyright © 2017年 IngDan. All rights reserved.
//

#import "YDBaseCustomView.h"

@implementation YDBaseCustomViewDataSource
#pragma mark - for subClass
-(Class) viewClass
{
    return [YDBaseCustomView class];
}

#pragma mark - private
-(CGFloat) viewHeight
{
    return [[self viewClass] viewHeight:self];
}

@end


@implementation YDBaseCustomView

#pragma mark - for subClass

+(CGFloat)viewHeight:(YDBaseTableViewCellDataSrouce *) dataSource
{
    return TableViewSectionHeaderHeight;
}

// addsubview  & makeCOnstraints
-(void) initSubviews
{
    
}

-(void) onViewModelChanged
{
    //    self.textLabel.text = self.dataSource.xxx
    //    [self layoutIfNeeded];
}

#pragma mark - lazyLoad
-(void)setDataSource:(id<YDViewDataSource>)dataSource
{
    if (![_dataSource isEqual:dataSource])
    {
        _dataSource = dataSource;
        [self onViewModelChanged];
    }
}
@end
